package com.itcam.jyuoop;

import java.util.ArrayList;
import java.util.List;

public class Sheet {  //卷子类
    List<Exercise> exercises;
    ExerciseGenerator generator;

    public Sheet(ExerciseGenerator generator) {
        this.generator = generator;
        this.exercises = new ArrayList<>();
    }

    public void addExercise() {
        Equation equation = new Equation();
        generator.generate(equation);
        exercises.add(equation);
    }

    public void print() {
        for (Exercise exercise : exercises) {
            exercise.print();
        }
    }
}